package koala.kuangjiademo.data;

import android.content.Context;
import android.widget.ImageView;

import com.wwgps.ect.R;

import java.util.ArrayList;
import java.util.List;

public class HomeAd {
    private int image;
    public String url;
    public String imageUrl;

    private HomeAd(int image) {
        this.image = image;
    }

    public ImageView getImageViewWithImag(Context context) {
        ImageView imageView = new ImageView(context);
        imageView.setImageResource(image);
        imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        return imageView;
    }

    public static List<HomeAd> getTestData() {
        List<HomeAd> list = new ArrayList<>();
        list.add(new HomeAd(R.drawable.banner_a));
        list.add(new HomeAd(R.drawable.banner_b));
        return list;
    }
}
